package com.jiyun.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiyun.pojo.NBank;
import com.jiyun.pojo.NCard;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface NCardMapper extends BaseMapper<NCard> {

//    List<NCard> findAllNCard();

    @Select("select * from n_card where id=#{id}")
    NCard findCard(Integer id);

    @Update("update n_card set card_status=1 where id=#{id}")
    int updateCardStatus(Integer id);
    @Update("update n_card set card_status=2 where id=#{id}")
    int updateCardStatus2(Integer id);

    List<NCard> findAll();

    @Delete("delete from n_card where id=#{id}")
    int deleteId(Integer id);
}
